import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//1.引入element-plus组件库
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//3.引入element-plus图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
//4.遍历引入进来的图标库ElementPlusIconsVue,并将每轮循环遍历到的当前图标进行全局注册,注册到vue实例app中
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
//2. .use(ElementPlus) 给vue实例app应用El组件库
app.use(ElementPlus).use(store).use(router).mount('#app')